package Demo5.service;

import Demo5.DAO.IUserDAO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements IUserService {
    @Autowired
    private IUserDAO userDAO;
    public boolean login(String username, String password) {
        System.out.println("UserService:开始处理用户登陆操作");
        System.out.println("UserService:验证用户信息是否有误");
        System.out.println("UserService:获取用户信息...");
        boolean sucess=userDAO.findUser();
        if (sucess){
            System.out.println("UserService:用户登陆成功");
        }else{
            System.out.println("UserService:用户登陆失败");

        }

        return  sucess;
    }
}
